<?php
/**
 * ExtWindow class file
 *
 * @author TrueSoftware B.V. (The Netherlands)
 * @link http://www.ext4yii.com
 * @copyright Copyright 2007-2010 TrueSoftware B.V. all rights reserved.
 * @license http://www.ext4yii.com/license/
 *          EVALUATION VERSION - NOT FOR COMMERCIAL USE OR DISTRIBUTION.
 * @version 0.7.2
 */

class ExtWindow extends ExtWindowBase
{
    /**
     * Gets the value of ExtJS baseCls property
     * @return String 
     */
    public function getBaseCls()
    {
    	return $this->getConfig("basecls");
    }

    /**
     * Sets the value of ExtJS baseCls property
     * @param String $value 
     */
    public function setBaseCls($value)
    {
    	$this->setConfig("basecls",$value);
    }

    /**
     * Gets the value of ExtJS closable property
     * @return Boolean 
     */
    public function getClosable()
    {
    	return $this->getConfig("closable");
    }

    /**
     * Sets the value of ExtJS closable property
     * @param Boolean $value 
     */
    public function setClosable($value)
    {
    	$this->setConfig("closable",$value);
    }

    /**
     * Gets the value of ExtJS closeAction property
     * @return String 
     */
    public function getCloseAction()
    {
    	return $this->getConfig("closeaction");
    }

    /**
     * Sets the value of ExtJS closeAction property
     * @param String $value 
     */
    public function setCloseAction($value)
    {
    	$this->setConfig("closeaction",$value);
    }

    /**
     * Gets the value of ExtJS collapsed property
     * @return Boolean 
     */
    public function getCollapsed()
    {
    	return $this->getConfig("collapsed");
    }

    /**
     * Sets the value of ExtJS collapsed property
     * @param Boolean $value 
     */
    public function setCollapsed($value)
    {
    	$this->setConfig("collapsed",$value);
    }

    /**
     * Gets the value of ExtJS constrain property
     * @return Boolean 
     */
    public function getConstrain()
    {
    	return $this->getConfig("constrain");
    }

    /**
     * Sets the value of ExtJS constrain property
     * @param Boolean $value 
     */
    public function setConstrain($value)
    {
    	$this->setConfig("constrain",$value);
    }

    /**
     * Gets the value of ExtJS constrainHeader property
     * @return Boolean 
     */
    public function getConstrainHeader()
    {
    	return $this->getConfig("constrainheader");
    }

    /**
     * Sets the value of ExtJS constrainHeader property
     * @param Boolean $value 
     */
    public function setConstrainHeader($value)
    {
    	$this->setConfig("constrainheader",$value);
    }

    /**
     * Gets the value of ExtJS defaultButton property
     * @return String/Number/Component 
     */
    public function getDefaultButton()
    {
    	return $this->getConfig("defaultbutton");
    }

    /**
     * Sets the value of ExtJS defaultButton property
     * @param String/Number/Component $value 
     */
    public function setDefaultButton($value)
    {
    	$this->setConfig("defaultbutton",$value);
    }

    /**
     * Gets the value of ExtJS draggable property
     * @return Boolean 
     */
    public function getDraggable()
    {
    	return $this->getConfig("draggable");
    }

    /**
     * Sets the value of ExtJS draggable property
     * @param Boolean $value 
     */
    public function setDraggable($value)
    {
    	$this->setConfig("draggable",$value);
    }

    /**
     * Gets the value of ExtJS expandOnShow property
     * @return Boolean 
     */
    public function getExpandOnShow()
    {
    	return $this->getConfig("expandonshow");
    }

    /**
     * Sets the value of ExtJS expandOnShow property
     * @param Boolean $value 
     */
    public function setExpandOnShow($value)
    {
    	$this->setConfig("expandonshow",$value);
    }

    /**
     * Gets the value of ExtJS hidden property
     * @return Boolean 
     */
    public function getHidden()
    {
    	return $this->getConfig("hidden");
    }

    /**
     * Sets the value of ExtJS hidden property
     * @param Boolean $value 
     */
    public function setHidden($value)
    {
    	$this->setConfig("hidden",$value);
    }

    /**
     * Gets the value of ExtJS initHidden property
     * @return Boolean 
     */
    public function getInitHidden()
    {
    	return $this->getConfig("inithidden");
    }

    /**
     * Sets the value of ExtJS initHidden property
     * @param Boolean $value 
     */
    public function setInitHidden($value)
    {
    	$this->setConfig("inithidden",$value);
    }

    /**
     * Gets the value of ExtJS maximizable property
     * @return Boolean 
     */
    public function getMaximizable()
    {
    	return $this->getConfig("maximizable");
    }

    /**
     * Sets the value of ExtJS maximizable property
     * @param Boolean $value 
     */
    public function setMaximizable($value)
    {
    	$this->setConfig("maximizable",$value);
    }

    /**
     * Gets the value of ExtJS maximized property
     * @return Boolean 
     */
    public function getMaximized()
    {
    	return $this->getConfig("maximized");
    }

    /**
     * Sets the value of ExtJS maximized property
     * @param Boolean $value 
     */
    public function setMaximized($value)
    {
    	$this->setConfig("maximized",$value);
    }

    /**
     * Gets the value of ExtJS minHeight property
     * @return Number 
     */
    public function getMinHeight()
    {
    	return $this->getConfig("minheight");
    }

    /**
     * Sets the value of ExtJS minHeight property
     * @param Number $value 
     */
    public function setMinHeight($value)
    {
    	$this->setConfig("minheight",$value);
    }

    /**
     * Gets the value of ExtJS minWidth property
     * @return Number 
     */
    public function getMinWidth()
    {
    	return $this->getConfig("minwidth");
    }

    /**
     * Sets the value of ExtJS minWidth property
     * @param Number $value 
     */
    public function setMinWidth($value)
    {
    	$this->setConfig("minwidth",$value);
    }

    /**
     * Gets the value of ExtJS minimizable property
     * @return Boolean 
     */
    public function getMinimizable()
    {
    	return $this->getConfig("minimizable");
    }

    /**
     * Sets the value of ExtJS minimizable property
     * @param Boolean $value 
     */
    public function setMinimizable($value)
    {
    	$this->setConfig("minimizable",$value);
    }

    /**
     * Gets the value of ExtJS modal property
     * @return Boolean 
     */
    public function getModal()
    {
    	return $this->getConfig("modal");
    }

    /**
     * Sets the value of ExtJS modal property
     * @param Boolean $value 
     */
    public function setModal($value)
    {
    	$this->setConfig("modal",$value);
    }

    /**
     * Gets the value of ExtJS onEsc property
     * @return Function 
     */
    public function getOnEsc()
    {
    	return $this->getConfig("onesc");
    }

    /**
     * Sets the value of ExtJS onEsc property
     * @param Function $value 
     */
    public function setOnEsc($value)
    {
    	$this->setConfig("onesc",$value);
    }

    /**
     * Gets the value of ExtJS plain property
     * @return Boolean 
     */
    public function getPlain()
    {
    	return $this->getConfig("plain");
    }

    /**
     * Sets the value of ExtJS plain property
     * @param Boolean $value 
     */
    public function setPlain($value)
    {
    	$this->setConfig("plain",$value);
    }

    /**
     * Gets the value of ExtJS resizable property
     * @return Boolean 
     */
    public function getResizable()
    {
    	return $this->getConfig("resizable");
    }

    /**
     * Sets the value of ExtJS resizable property
     * @param Boolean $value 
     */
    public function setResizable($value)
    {
    	$this->setConfig("resizable",$value);
    }

    /**
     * Gets the value of ExtJS resizeHandles property
     * @return String 
     */
    public function getResizeHandles()
    {
    	return $this->getConfig("resizehandles");
    }

    /**
     * Sets the value of ExtJS resizeHandles property
     * @param String $value 
     */
    public function setResizeHandles($value)
    {
    	$this->setConfig("resizehandles",$value);
    }

    /**
     * Gets the value of ExtJS x property
     * @return Number 
     */
    public function getX()
    {
    	return $this->getConfig("x");
    }

    /**
     * Sets the value of ExtJS x property
     * @param Number $value 
     */
    public function setX($value)
    {
    	$this->setConfig("x",$value);
    }

    /**
     * Gets the value of ExtJS y property
     * @return Number 
     */
    public function getY()
    {
    	return $this->getConfig("y");
    }

    /**
     * Sets the value of ExtJS y property
     * @param Number $value 
     */
    public function setY($value)
    {
    	$this->setConfig("y",$value);
    }

    /**
     * @description maps to the alignTo function in Ext.Window
     * @param sender String -
     * @param element Mixed -
     * @param position String -
     * @param offsets Array optional 
     */
    public static function alignTo_OnAjax($element,$position,$offsets=null,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('alignTo(%s,"%s",%s)',
    		array($element,str_replace('"','\"',$position),$offsets),
    			 $sender);
    }

    /**
     * @description maps to the anchorTo function in Ext.Window
     * @param sender String -
     * @param element Mixed -
     * @param position String -
     * @param offsets Array optional
     * @param monitorScroll Boolean/Number optional 
     */
    public static function anchorTo_OnAjax($element,$position,$offsets=null,$monitorScroll=null,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('anchorTo(%s,"%s",%s,%s)',
    		array($element,str_replace('"','\"',$position),$offsets,$monitorScroll),
    			 $sender);
    }

    /**
     * @description maps to the center function in Ext.Window
     * @param sender String -
     */
    public static function center_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('center()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the close function in Ext.Window
     * @param sender String -
     */
    public static function close_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('close()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the focus function in Ext.Window
     * @param sender String -
     */
    public static function focus_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('focus()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the hide function in Ext.Window
     * @param sender String -
     * @param animateTarget String/Element optional
     * @param callback Function optional
     * @param scope Object optional 
     */
    public static function hide_OnAjax($animateTarget=null,$callback=null,$scope=null,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('hide(%s,%s,%s)',
    		array($animateTarget,$callback,$scope),
    			 $sender);
    }

    /**
     * @description maps to the maximize function in Ext.Window
     * @param sender String -
     */
    public static function maximize_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('maximize()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the minimize function in Ext.Window
     * @param sender String -
     */
    public static function minimize_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('minimize()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the restore function in Ext.Window
     * @param sender String -
     */
    public static function restore_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('restore()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the setActive function in Ext.Window
     * @param sender String -
     * @param active Boolean - 
     */
    public static function setActive_OnAjax($active,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('setActive(%s)',
    		array($active),
    			 $sender);
    }

    /**
     * @description maps to the setAnimateTarget function in Ext.Window
     * @param sender String -
     * @param el String/Element - 
     */
    public static function setAnimateTarget_OnAjax($el,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('setAnimateTarget(%s)',
    		array($el),
    			 $sender);
    }

    /**
     * @description maps to the show function in Ext.Window
     * @param sender String -
     * @param animateTarget String/Element optional
     * @param callback Function optional
     * @param scope Object optional 
     */
    public static function show_OnAjax($animateTarget=null,$callback=null,$scope=null,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('show(%s,%s,%s)',
    		array($animateTarget,$callback,$scope),
    			 $sender);
    }

    /**
     * @description maps to the toBack function in Ext.Window
     * @param sender String -
     */
    public static function toBack_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('toBack()',
    		array(),
    			 $sender);
    }

    /**
     * @description maps to the toFront function in Ext.Window
     * @param sender String -
     * @param e Boolean optional 
     */
    public static function toFront_OnAjax($e=null,$sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('toFront(%s)',
    		array($e),
    			 $sender);
    }

    /**
     * @description maps to the toggleMaximize function in Ext.Window
     * @param sender String -
     */
    public static function toggleMaximize_OnAjax($sender=null)
    {
    	ExtWidget::checkSetAjaxRequestValue('toggleMaximize()',
    		array(),
    			 $sender);
    }

    
    public function __construct()
    {
        parent::__construct();
        $this->configmap = array_merge($this->configmap,array(
            'basecls' => 'baseCls',
            'closeaction' => 'closeAction',
            'constrainheader' => 'constrainHeader',
            'defaultbutton' => 'defaultButton',
            'expandonshow' => 'expandOnShow',
            'inithidden' => 'initHidden',
            'minheight' => 'minHeight',
            'minwidth' => 'minWidth',
            'onesc' => 'onEsc',
            'resizehandles' => 'resizeHandles'
        ));

        $this->eventtable = array_merge($this->eventtable,array(
            'activate' => array('sender'),
            'deactivate' => array('sender'),
            'maximize' => array('sender'),
            'minimize' => array('sender'),
            'resize' => array('sender','width','height'),
            'restore' => array('sender')
        ));

        $this->jsconfigs = array_merge($this->jsconfigs,array(
            'onEsc' => true
        ));

        $this->setXType('window');
        $this->setXClass('Ext.Window');
    }    
}
?>